home *** CD-ROM | disk | FTP | other *** search
/ 500 MB Nyheder Direkte fra Internet 9 / 500 MB nyheder direkte fra internet CD 9.iso / start / zipped / dos / novell / sdk.exe / SDK / NWSIPX32.H next >
C/C++ Source or Header  |  1995-08-23  |  24KB  |  961 lines

  1. //*++======================================================================
  2. // Program Name:     Ipx/Spx 32-bit API
  3. //
  4. // File Name:        NWSIPX32.H
  5. //
  6. // Version:          v1.00
  7. //
  8. // Abstract:         This module defines the 32-bit API for IPX/SPX
  9. //
  10. // Copyright (C) 1995  Novell, Inc.  All Rights Reserved.
  11. //
  12. // No part of this file may be duplicated, revised, translated, localized,
  13. // or modified in any manner or compiled, linked or uploaded or downloaded
  14. // to or from any computer system without the prior written consent of
  15. // Novell, Inc.
  16. //=====================================================================--*/
  17.  
  18. #ifndef NWSIPX32_H
  19. #define NWSIPX32_H
  20.  
  21. //===[ Manifest constants ]================================================
  22.  
  23. //
  24. // Current API version
  25. //
  26.  
  27. #define NWSIPX32_API_VERSION    0x00000001
  28.  
  29.  
  30. //
  31. // NWTCB Synchronization Types
  32. //
  33. // These types are used to control the request completion notification to
  34. // the application. They are passed as a parameter to the
  35. // NWSipxAllocControlBlock and NWSipxChangeControlBlock API primitives.
  36. //
  37.  
  38. #define SIPX_API_EVENT                    0x00000001 // Request allocs event
  39. #define SIPX_API_MUX_EVENT                0x00000002 // Request allocs mux event
  40. #define SIPX_BLOCKING               0x00000003 // Request is synchronous
  41. #define SIPX_POLLING                0x00000004 // Request will poll
  42. #define SIPX_USER_EVENT             0x00000005 // Request uses app event
  43. #define SIPX_CALLBACK                    0x00000006 // Request uses app callback
  44.  
  45.  
  46. //
  47. // Event Timeout Constant Definitions.
  48. //
  49. // These constants are used as parameters to the NWSipxWaitForSingleEvent
  50. // and NWSipxWaitForMultipleEvents API primitives.  The SIPX_NO_WAIT
  51. // causes the API primitives to check the signaled status of the events but
  52. // not wait for event completion.  The SIPX_INFINITE_WAIT constant causes
  53. // the wait API primitives to wait forever for the event to be signalled.
  54. //
  55.  
  56. #define SIPX_NO_WAIT                        0x00000000 // Return immediately.
  57. #define SIPX_INFINITE_WAIT                0xFFFFFFFF // Wait forever
  58.  
  59.  
  60. //
  61. // Mulitiple API Event Constants
  62. //
  63. // This constant is used when calling NWSipxAllocControlBlock and 
  64. // NWSipxChangeControlBlock with the SIPX_API_MUX_EVENT synchronization type
  65. // specified. A pointer to this constant is passed as a parameter to tell 
  66. // the system to allocate the multiple events from a new event group and pass 
  67. // the event group identifier back in its place.
  68. //
  69.  
  70. #define SIPX_ALLOC_MUX_GROUP            (SIPXMUXGRP_HANDLE) 0xFFFFFFFF 
  71.  
  72.  
  73. //
  74. // Query Service Types
  75. //
  76. // These type are used when calling the NWSipxQueryServices API primitive.
  77. // They are passed in the queryType parameter to specify the type of SAP 
  78. // query to perform.  
  79. //
  80.  
  81. #define SIPX_ALL_SERVERS                0x00000001 // Query for all servers
  82. #define SIPX_NEAREST_SERVER            0x00000002 // Query for nearest server
  83.  
  84.  
  85. //
  86. // Establish Connection Flags
  87. //
  88. // These flags are set when calling the NWSipxEstablishConnection API
  89. // primitive.  They are passed by the application in the NWTCB structure
  90. // in the TCBFlags field.  The SIPX_CONNECT_NO_WATCHDOG flag disables the
  91. // connection keep-alive protocol.
  92. //
  93.  
  94. #define SIPX_CONNECT_NO_WATCHDOG        0x00000001 // Don't enable the watchdog
  95.  
  96.  
  97. //
  98. // Listen For Connection Flags
  99. //
  100. // These flags are set when calling the NWSipxListenForConnection and
  101. // the NWSipxAcceptConnection API primitives.  They are passed by the
  102. // application in the NWTCB structure in the TCBFlags field.  The
  103. // SIPX_LISTEN_DELAY_ACCEPT flag forces the listen request to return
  104. // immediately upon receiving a connection request without replying to the
  105. // request.  The connection request can be satisified later by calling
  106. // NWSipxAcceptConnection.  The SIPX_LISTEN_NO_WATCHDOG flag disables the
  107. // connection keep-alive protocol.
  108. //
  109.  
  110. #define SIPX_LISTEN_DELAY_ACCEPT        0x00000001 // Delayed connection accept
  111. #define SIPX_LISTEN_NO_WATCHDOG        0x00000002 // Don't enable the watchdog
  112.  
  113.  
  114. //
  115. // Terminate Connection Flags
  116. //
  117. // These flags are set when calling the NWSipxTerminateConnection API
  118. // primitive.  They are passed by the application in the NWTCB structure
  119. // in the TCBFlags field.  The SIPX_TERM_ABORT flags causes the local
  120. // connection endpoint to be closed without informing the remote connection
  121. // endpoint.  The SIPX_TERM_ACKED flag cause the remote connection endpoint
  122. //  to be notified that the local endpoint is closing.
  123. //
  124.  
  125. #define SIPX_TERM_ABORT                    0x00000001 // Abort connection
  126. #define SIPX_TERM_ACKED                    0x00000002 // SPX terminate
  127. #define SIPX_TERM_REJECT                0x00000004 // Reject connection
  128.  
  129.  
  130. //
  131. // Send Message Flags
  132. //
  133. // These flags are set when calling the NWSipxSendMessage API primitive.
  134. // They are passed by the application in the NWTCB structure in the TCBFlags
  135. // field.  The SIPX_SNDMSG_PARTIAL flag tells the SPX driver not to set the
  136. // end-of-message bit in the SPX packet header.  Setting the end-of-message
  137. // bit implies that the entire message was represented in the send request.
  138. // The SIPX_SNDMSG_DSTRM_TYPE flag sets the value in the TCBDatastreamType
  139. // field of the NWTCB in the datastream field of the SPX packet header.  The
  140. // SIPX_SNDMSG_ATTN flag tell the SPX driver to set the SPX attention bit
  141. // in the SPX header of send packet.
  142. //
  143.  
  144. #define SIPX_SNDMSG_PARTIAL            0x00000001 // Message is not all here
  145. #define SIPX_SNDMSG_DSTRM_TYPE        0x00000002 // Set datastream type
  146. #define SIPX_SNDMSG_ATTN                0x00000004 // Set SPX ATTN bit
  147.  
  148.  
  149. //
  150. // Send Datagram Flags
  151. //
  152. // These flags are set when calling the NWSipxSendDatagram API primitive.
  153. // They are passed by the application in the NWTCB structure in the TCBFlags
  154. // field.  The SIPX_SNDDG_PACKET_TYPE flag sets the value in the
  155. // TCBPacketType field of the NWTCB in the packet type field of the IPX
  156. // header.  The SIPX_SNDDG_VERIFY_ROUTE causes IPX to rediscover the route
  157. // to the remote endpoint.  The SIPX_SNDDG_SPECIFIC_ROUTE tells the IPX
  158. // driver to use the subnetwork handle in the TCBSubnetworkHandle field of 
  159. // the NWTCB structure to send the packet.  The SIPX_SNDDG_BEST_ROUTE flag 
  160. // tells the IPX driver to select the best route based on the packet size.  
  161. // The handle of the subnetwork used to send the packet will be returned in 
  162. // the TCBSubnetworkHandle field of the NWTCB structure when the 
  163. // NWSipxSendDatagram request completes.  The SIPX_SNDDG_SPECIFIC_ROUTE and 
  164. // the SIPX_SNDDG_BEST_ROUTE flags are mutually exclusive.  The 
  165. // SIPX_SNDDG_GENERATE_CHKSUM flag causes a checksum to be generated using 
  166. // the IPX packet and set in the checksum field of the IPX header.
  167. //
  168.  
  169. #define SIPX_SNDDG_PACKET_TYPE        0x00000001 // Set the packet type
  170. #define SIPX_SNDDG_VERIFY_ROUTE        0x00000002 // Get the route again
  171. #define SIPX_SNDDG_SPECIFIC_ROUTE    0x00000004 // Subnetwork specified
  172. #define SIPX_SNDDG_BEST_ROUTE            0x00000008 // Ipx choose best route
  173. #define SIPX_SNDDG_GENERATE_CHKSUM    0x00000010 // Send with checksum
  174.  
  175.  
  176. //
  177. // Receive Message Flags
  178. //
  179. // These flags are returned when calling the NWSipxReceiveMessage API
  180. // primitive.  They are returned by the system in the TCBFlags field of the
  181. // NWTCB structure.  The SIPX_RCVMSG_PARTIAL is returned when the
  182. // end-of-message bit in the received SPX header is not set or if the
  183. // received data overflows the application's buffer.  If the
  184. // SIPX_RCVMSG_PARTIAL bit is not set, end-of-message is implied and the
  185. // entire message has been received.  The SIPX_RCVMSG_ATTN flag is returned
  186. // when the SPX attention bit is set in the received SPX header.
  187. //
  188.  
  189. #define SIPX_RCVMSG_PARTIAL            0x00000001 // More data to receive
  190. #define SIPX_RCVMSG_ATTN                0x00000002 // Received SPX ATTN bit
  191.  
  192.  
  193. //
  194. // Receive Datagram Flags
  195. //
  196. // These flags are set when calling the NWSipxReceiveDatagram API primitive.
  197. // They are passed by the application in the TCBFlags field of the NWTCB
  198. // structure.  The SIPX_RCVDG_VALIDATE_CHKSUM flag causes the checksum
  199. // received in the IPX packet header to be verified.
  200. //
  201.  
  202. #define SIPX_RCVDG_VALIDATE_CHKSUM    0x00000001 // Validate received checksum
  203.  
  204.  
  205. //
  206. // Query For Services Flags
  207. //
  208. // The SIPX_QUERY_SPECIFIC_ROUTE is used to tell the query process which
  209. // subnetwork to send the query request out on.
  210. //
  211.  
  212. #define SIPX_QUERY_SPECIFIC_ROUTE    0x00000001 // Use specified subnetwork 
  213.  
  214.  
  215. //
  216. // Transport events.
  217. //
  218. // These are events that the application may register to receive
  219. // notification for when calling the NWSipxRegisterForTransportEvent API
  220. // primitive.  They are passed by the application in the TCBTransportEvent
  221. // field of the NWTCB structure.
  222. //
  223.  
  224. #define SIPX_LISTEN_FOR_DISCONNECT    0x00000001    // Listen for remote term
  225. #define SIPX_SCHEDULE_TIMER_EVENT    0x00000002    // Schedule timer event
  226. #define SIPX_SUBNET_STATUS_CHANGE    0x00000003    // Subnet status change
  227.  
  228.  
  229. //
  230. // Information Levels
  231. //
  232. // Each level causes different information to be set or retrieved.  These
  233. // levels are passed by the application as parameters to the
  234. // NWSipxGetInfomation and NWSipxSetInformation API primitives.
  235. // 
  236. //
  237.  
  238. #define SIPX_API_INFORMATION            0x00000001
  239. #define SIPX_SOCKET_INFORMATION        0x00000002
  240. #define SIPX_CONN_INFORMATION            0x00000003
  241. #define SIPX_NWTCB_INFORMATION        0x00000004
  242.  
  243.  
  244. //
  245. // Maximum Transport Address Length
  246. //
  247. // This is the maximum length of a transport address.  It is used in the
  248. // NETADDR structure.
  249. //
  250.  
  251. #define SIPX_MAX_TRANS_ADDR_LEN        32
  252.  
  253.  
  254. //
  255. // Connection States
  256. //
  257. // These values are retrieved in the SIPX_CONN_INFO structure by the
  258. // NWSipxGetInformation API primitive and represent the current state of
  259. // the specified connection.
  260. //
  261.  
  262. #define SIPX_ALLOCATED                    0x00000001
  263. #define SIPX_CONNECTING                    0x00000002
  264. #define SIPX_LISTENING                    0x00000003
  265. #define SIPX_WAITING_ACCEPT            0x00000004
  266. #define SIPX_CONNECTED                    0x00000005
  267. #define SIPX_TERMINATING                0x00000006
  268. #define SIPX_TERMINATED                    0x00000007
  269.  
  270.  
  271. //
  272. // NWTCB State Parameters
  273. //
  274. // These values are retrieved in the SIPX_NWTCB_INFO structure by the
  275. // NWSipxGetInformation API primitive and describe the current state of the
  276. // specified NWTCB.
  277. //
  278.  
  279. #define    SIPX_TCB_ALLOCATED            0x00000000 // Control block is allocated
  280. #define    SIPX_TCB_IN_USE                0x00000001 // Control block is in use
  281.  
  282.  
  283. //
  284. //
  285. // Connection Parameters.
  286. //
  287. // These values are set and retreived in the SIPX_CONN_INFO structure by the
  288. // NWSipxGetInformation and NWSipxSetInformation API primitives.
  289. // SIPX_CONN_STREAM tells the SPX driver to ignore the end-of-message bit
  290. // and hand up any received data as soon as it arrives, even if the buffer
  291. // is not full.  SIPX_CONN_MESSAGE value causes the SPX driver to respect
  292. // the end-of-message bit.  The SIPX_CONN_LONG_TERM and SIPX_CONN_SHORT_TERM
  293. // values specifies to the SPX driver the lifetime of the connection.
  294. //
  295.  
  296. #define SIPX_CONN_STREAM                0x00000001 // Ignore the EOM bit
  297. #define SIPX_CONN_MESSAGE                0x00000002 // Respect the EOM bit
  298. #define SIPX_CONN_LONG_TERM            0x00000003 // Long lived connection
  299. #define SIPX_CONN_SHORT_TERM            0x00000004 // Short lived connection
  300.  
  301.  
  302. //
  303. // Socket Parameters
  304. //
  305. // These values are set and retreived in the SIPX_SOCKET_INFO structure by
  306. // the NWSipxGetInformation and NWSipxSetInformation API primitives.  The
  307. // SIPX_SOCK_STATIC and the SIPX_SOCK_DYNAMIC flags tells whether the
  308. // specified socket is a named socket or a dynamic socket.
  309. //
  310.  
  311. #define SIPX_SOCK_STATIC                0x00000001 // Named socket
  312. #define SIPX_SOCK_DYNAMIC                0x00000002 // Dynamic socket
  313.  
  314.  
  315. //
  316. // SUBNET Parameters
  317. //                
  318. // These values are retreived in the SIPX_SUBNET_INFO structure by
  319. // the NWSipxGetInformation API primitive.  The SIPX_SN_XSUM_FLAG
  320. // tells whether the SUBNET supports checksumming.  The SIPX_SN_DEFAULT_FLAG
  321. // indicates that this SUBNET is the default subnetwork.  
  322. //
  323.  
  324. #define SIPX_SN_XSUM_FLAG                0x00000001 // Checksum supported
  325. #define SIPX_SN_DEFAULT_FLAG            0x00000002 // This is the default subnet
  326. #define SIPX_SN_ACTIVE_FLAG            0x00000004 // Subnet is active
  327.  
  328.  
  329. //
  330. // Status Code Definitions
  331. //
  332. // These status codes are returned by the API primitives.  Macros are
  333. // defined to quickly check whether the status is informational or
  334. // indicates an error.
  335. //
  336.  
  337. #define SIPX_SUCCESS(x)    !(((nuint32)(x)) & 0x80000000)
  338. #define SIPX_ERROR(x)     (((nuint32)(x)) & 0x80000000)
  339.  
  340.  
  341. //
  342. // If the most significant bit of the return status code is set, this
  343. // indicates an error condition.  If the second most significant bit is
  344. // set, this indicates a warning or informational status.  If both these
  345. // bits are clear, the operation was successful.
  346. //
  347.  
  348. #define SIPX_SUCCESSFUL                        0x00000000
  349. #define SIPX_PENDING                            0x00000001
  350.  
  351. #define SIPX_ACCESS_DENIED                    0x80000001
  352. #define SIPX_ACCESS_VIOLATION                0x80000002
  353. #define SIPX_CANCELED                   0x80000003
  354. #define SIPX_CONNECTION_ABORTED            0x80000004
  355. #define SIPX_CANNOT_CANCEL                    0x80000005
  356. #define SIPX_CONNECTION_TERMINATED        0x80000006
  357. #define SIPX_INSUFFICIENT_RESOURCES        0x80000007
  358. #define SIPX_INVALID_SUBNETWORK_HANDLE    0x80000008
  359. #define SIPX_INVALID_CHECKSUM                0x80000009
  360. #define SIPX_INVALID_CONNECTION_HANDLE    0x8000000A
  361. #define SIPX_INVALID_FRAGMENT_COUNT        0x8000000B
  362. #define SIPX_INVALID_FRAGMENT_LIST        0x8000000C
  363. #define SIPX_INVALID_HANDLE                0x8000000D
  364. #define SIPX_INVALID_IOCTL_BUFFER_LEN    0x8000000E
  365. #define SIPX_INVALID_IOCTL_FUNCTION        0x8000000F
  366. #define SIPX_INVALID_INFO_TYPE            0x80000010
  367. #define SIPX_INVALID_MUX_GROUP_HANDLE    0x80000012
  368. #define SIPX_INVALID_NETWORK_ADDRESS    0x80000013
  369. #define SIPX_INVALID_NWTCB                    0x80000014
  370. #define SIPX_INVALID_NWTCB_FLAGS            0x80000015
  371. #define SIPX_INVALID_PARAMETER            0x80000016
  372. #define SIPX_INVALID_PARAMETER_MIX        0x80000017
  373. #define SIPX_INVALID_QUERY_TYPE            0x80000018
  374. #define SIPX_INVALID_SERVICE_TYPE        0x80000019
  375. #define SIPX_INVALID_SOCKET_HANDLE        0x8000001A
  376. #define SIPX_INVALID_STATE                    0x8000001B
  377. #define SIPX_INVALID_SYNC_TYPE            0x8000001C
  378. #define SIPX_INVALID_TRANSPORT_EVENT    0x8000001D
  379. #define SIPX_MEMORY_LOCK_ERROR            0x8000001E
  380. #define SIPX_NO_SUBNETS_BOUND_TO_IPX    0x8000001F
  381. #define SIPX_NO_RESPONSE_FROM_TARGET    0x80000020 
  382. #define SIPX_NO_ROUTE_TO_TARGET            0x80000021
  383. #define SIPX_SERVICE_NOT_ACTIVE            0x80000022
  384. #define SIPX_NWTCB_IN_USE                    0x80000023
  385. #define SIPX_PARTIAL_SERVER_INFO            0x80000024
  386. #define SIPX_REQUEST_NOT_PENDING            0x80000025
  387. #define SIPX_SOCKET_IN_USE                    0x80000026
  388. #define SIPX_UNSUCCESSFUL                    0x80000027
  389. #define SIPX_INTERNAL_ERROR                0x80000028
  390. #define SIPX_SERVICE_ALREADY_ACTIVE        0x80000029
  391. #define SIPX_INVALID_SERVICE_NAME         0x8000002A
  392.  
  393.  
  394. //===[ Type definitions ]==================================================
  395.  
  396. //
  397. // Transport address types.
  398. //
  399.  
  400. typedef enum TAG_TRANSPORT_ADDR_TYPE
  401. {
  402.     TA_IPX_SPX,
  403.     TA_COUNT
  404.  
  405. } TRANSPORT_ADDR_TYPE;
  406.  
  407.  
  408. //
  409. // NetWare IPX/SPX transport address structure definition.
  410. //
  411.  
  412. typedef struct TAG_IPXADDR
  413. {
  414.     nuint8    NANet[4];
  415.     nuint8    NANode[6];
  416.     nuint8    NASocket[2];
  417.     
  418. } IPXADDR, *PIPXADDR;
  419.  
  420.  
  421. //
  422. // Transport Address Structure
  423. //
  424. // This structure can be used to define multiple address types.
  425. // The only address type currently supported is the TA_IPX_SPX type.
  426. //
  427.  
  428. typedef struct TAG_NETADDR
  429. {
  430.     nuint32    NAType;
  431.     nuint32    NALength;
  432.     union
  433.     {
  434.         nuint8    NAGenAddress[SIPX_MAX_TRANS_ADDR_LEN];
  435.         IPXADDR    NAIpxAddress;
  436.  
  437.     } NAAddress;
  438.  
  439. } NETADDR, *PNETADDR;
  440.  
  441.  
  442. //
  443. // Data fragment structure defintion.
  444. //
  445.  
  446. typedef struct TAG_FRAGMENT
  447. {
  448.     nptr        FAddress;
  449.     nuint32    FLength;
  450.  
  451. } FRAGMENT, *PFRAGMENT;
  452.  
  453.  
  454. //
  455. // SIPX Handle structure definition
  456. //
  457.  
  458. struct TAG_SIPXHANDLE;    
  459.  
  460.  
  461. //
  462. // Transport address object context definition.
  463. //
  464.  
  465. typedef struct TAG_SIPXHANDLE    *SIPXSOCK_HANDLE, **PSIPXSOCK_HANDLE;
  466.  
  467.  
  468. //
  469. // NetWare transport connection context structure.
  470. //
  471.  
  472.  
  473. typedef struct TAG_SIPXHANDLE    *SIPXCONN_HANDLE, **PSIPXCONN_HANDLE;
  474.  
  475.  
  476. //
  477. // Subnetwork object context definition.
  478. //
  479.  
  480. typedef struct TAG_SIPXHANDLE    *SIPXSUBNET_HANDLE, **PSIPXSUBNET_HANDLE;
  481.  
  482.  
  483. //
  484. // MuxGroup object context definition.
  485. //
  486.  
  487. typedef struct TAG_SIPXHANDLE    *SIPXMUXGRP_HANDLE, **PSIPXMUXGRP_HANDLE;
  488.  
  489.  
  490. //
  491. // NetWare transport control block structure definition.
  492. //
  493.  
  494. typedef struct    TAG_NWTCB
  495. {
  496.     //
  497.     // Link pointers for control block list manipulation.
  498.     //
  499.  
  500.     struct TAG_NWTCB     *TCBNext;
  501.     struct TAG_NWTCB    *TCBPrevious;
  502.  
  503.  
  504.     //
  505.     // The socket handle returned by NWSipxOpenSocket.
  506.     //
  507.  
  508.     SIPXSOCK_HANDLE    TCBSockHandle;
  509.  
  510.  
  511.     //
  512.     // The connection handle returned by NWSipxOpenConnectionEndpoint.
  513.     //
  514.  
  515.     SIPXCONN_HANDLE    TCBConnHandle;
  516.  
  517.  
  518.     //
  519.     // Client specific context field, typically used when specifing
  520.     // a callback routine.
  521.     //
  522.  
  523.     nptr                    TCBClientContext;
  524.  
  525.  
  526.     //
  527.     // Transport event parameters.  These are used when registering
  528.     // for specific transport events.
  529.     //
  530.  
  531.     nuint32                TCBTransportEvent;
  532.     union
  533.     {
  534.         nuint32            TCBTimeout;
  535.         nuint8            TCBEventSpace[32];
  536.  
  537.     } TCBEvent;
  538.  
  539.  
  540.     //
  541.     // The final status for the request just completed.
  542.     //
  543.  
  544.     nuint32                TCBFinalStatus;
  545.  
  546.  
  547.     //
  548.     // Number of bytes sent or received on a transfer (send/receive) data
  549.     // operation.
  550.     //
  551.  
  552.     nuint32                TCBBytesTransferred;
  553.  
  554.  
  555.     //
  556.     // Request/Reply flags used to set or indicate status.
  557.     //
  558.  
  559.     nflag32                TCBFlags;
  560.  
  561.  
  562.     //
  563.     // Network address of remote client.  Filled in by
  564.     // NWSipxListenForConnection and NWSipxReceiveDatagram.  Set by
  565.     // application for NWSipxEstablishConnection and NWSipxSendDatagram.
  566.     //
  567.  
  568.     NETADDR                TCBRemoteAddress;
  569.  
  570.  
  571.     //
  572.     // Handle of subnetwork used to send or receive packet.  The subnetwork
  573.     // handle may be set in this field by the application when using the
  574.     // NWSipxSendDatagram API primitive to direct IPX to use a specific
  575.     // subnetwork.  The handle of the subnetwork used to send or receive the
  576.     // packet is returned in this field upon completion of the
  577.     // NWSipxSendDatagram, NWSipxReceiveDatagram, NWSipxEstablishConnection
  578.     // and NWSipxListenForConnection requests.
  579.     //
  580.  
  581.     SIPXSUBNET_HANDLE    TCBSubnetworkHandle;
  582.  
  583.  
  584.     //
  585.     // Message sequence number.
  586.     //
  587.  
  588.     nuint32                TCBMsgSequenceNumber;
  589.  
  590.  
  591.     //
  592.     // IPX packet type.
  593.     //
  594.  
  595.     nuint8                TCBPacketType;
  596.  
  597.  
  598.     //
  599.     // SPX Datastream type.
  600.     //
  601.  
  602.     nuint8                TCBDataStreamType;
  603.  
  604.  
  605.     //
  606.     // Reserved for future use.
  607.     //
  608.  
  609.  
  610.     nuint8                TCBReserved[2];
  611.  
  612.  
  613.     //
  614.     // Number of data fragments specified by the client.
  615.     //
  616.  
  617.     nuint32                TCBFragmentCount;
  618.  
  619.  
  620.     //
  621.     // Pointer to the client data fragment list.
  622.     //
  623.  
  624.     PFRAGMENT            TCBFragmentList;
  625.  
  626. } NWTCB, *PNWTCB, **PPNWTCB;
  627.  
  628.  
  629. //
  630. // API Information Structure
  631. //
  632. //
  633. // The SUBNET_INFO structure is associated with the API_INFO structure.
  634. // Each SUBNET_INFO structure describes an attachment to the network.
  635. // There is a unique local network address (net.node) bound to each SUBNET
  636. // by the IPX protocol stack.
  637. //
  638.  
  639. typedef struct TAG_SIPX_SUBNET_INFO
  640. {
  641.     SIPXSUBNET_HANDLE    SNSubnetworkHandle;
  642.     nuint32                SNMaxNsduSize;
  643.     NETADDR                SNNetAddress;
  644.     nflag32                SNFlags;
  645.  
  646. } SIPX_SUBNET_INFO, *PSIPX_SUBNET_INFO;
  647.  
  648.  
  649. typedef struct  TAG_SIPX_API_INFO
  650. {
  651.     nuint32                AIApiVersion;
  652.     nuint32                AIIpxVersion;
  653.     nuint32                AISpxVersion;
  654.     nuint32                AISubnetCount;            // Number of SUBNETs bound to by IPX
  655.     SIPX_SUBNET_INFO    AISubnetInfo[1];        // Array of AISubnetCount entries
  656.  
  657. } SIPX_API_INFO, *PSIPX_API_INFO;
  658.  
  659.  
  660. //
  661. // Socket Information Structure
  662. //
  663.  
  664. typedef struct  TAG_SIPX_SOCKET_INFO
  665. {
  666.     nuint32                SIIpxVersion;
  667.     nflag32                SIAttributeFlags;
  668.     nuint16                SISocketNumber;
  669.     nuint16                SIReserved;
  670.     nuint32                SIPacketType;
  671.     SIPXSUBNET_HANDLE    SISubnetworkHandle;
  672.  
  673. } SIPX_SOCKET_INFO, *PSIPX_SOCKET_INFO;
  674.  
  675.  
  676. //
  677. // Connection Information Structure
  678. //
  679. typedef struct  TAG_SIPX_CONN_INFO
  680. {
  681.     nuint32    CISpxVersion;
  682.     nuint32    CIState;
  683.     nuint32    CIDataStreamType;
  684.     nuint32    CIConnectionProfile;
  685.     nuint32    CIInputMode;
  686.     nuint32    CIStreamingTimer;
  687.     nuint32    CIRetryCount;
  688.     nptr        CISocketHandle;
  689.     nuint32    CIMaxTsduSize;
  690.  
  691. } SIPX_CONN_INFO, *PSIPX_CONN_INFO;
  692.  
  693.  
  694. //
  695. // NWTCB Information Structure
  696. //
  697. typedef struct  TAG_SIPX_NWTCB_INFO
  698. {
  699.     nuint32    NWIState;
  700.     nuint32    NWIEventType;
  701.     nuint32  NWIEventInfo;
  702.  
  703. } SIPX_NWTCB_INFO, *PSIPX_NWTCB_INFO;
  704.  
  705.  
  706. //
  707. // Service Information Structure
  708. //
  709. //
  710. // The SIPX_SERVICE_INFO structure is used with the NWSipxQueryServices API 
  711. // primitive.  One or more SIPX_SERVICE_INFO structures are returned in the
  712. // data space provided by the client application.  These structures contain
  713. // the requested server information.
  714. //
  715.  
  716. typedef struct TAG_SIPX_SERVICE_INFO
  717. {
  718.     nuint16    SIServerType;        
  719.     nstr8        SIServerName[48];
  720.     nuint8    SINetwork[4];
  721.     nuint8    SINode[6];
  722.     nuint8    SISocket[2];
  723.     nuint16    SIHops;
  724.  
  725. } SIPX_SERVICE_INFO, *PSIPX_SERVICE_INFO;
  726.  
  727.  
  728. //===[ Function prototypes ]===============================================
  729.  
  730. N_EXTERN_LIBRARY(nuint32)
  731. NWSipxAcceptConnection
  732. (
  733.     PNWTCB                pNwtcb,
  734.     SIPXCONN_HANDLE    hAcceptHandle
  735. );
  736.  
  737.  
  738. N_EXTERN_LIBRARY(nuint32)
  739. NWSipxAdvertiseService
  740. (
  741.     nuint16                serviceType,
  742.     pnstr8                pServerName,
  743.     SIPXSOCK_HANDLE    hSockHandle
  744. );
  745.  
  746.  
  747. N_EXTERN_LIBRARY(nuint32)
  748. NWSipxAllocControlBlock
  749. (
  750.     nuint32                syncType,
  751.     nptr                    pEventInfo,
  752.     PPNWTCB                ppNwtcb
  753. );
  754.  
  755.  
  756. N_EXTERN_LIBRARY(nuint32)
  757. NWSipxCancelAdvertiseService
  758. (
  759.     nuint16                serviceType,
  760.     pnstr8                pServerName,
  761.     SIPXSOCK_HANDLE    hSockHandle
  762. );
  763.  
  764.  
  765. N_EXTERN_LIBRARY(nuint32)
  766. NWSipxCancelPendingRequest
  767. (
  768.     PNWTCB                pNwtcb
  769. );
  770.  
  771.  
  772. N_EXTERN_LIBRARY(nuint32)
  773. NWSipxChangeControlBlock
  774. (
  775.     nuint32                syncType,
  776.     nptr                    pEventInfo,
  777.     PNWTCB                pNwtcb
  778. );
  779.  
  780.  
  781. N_EXTERN_LIBRARY(nuint32)
  782. NWSipxCheckRequestComplete
  783. (
  784.     PNWTCB                pNwtcb
  785. );
  786.  
  787.  
  788. N_EXTERN_LIBRARY(nuint32)
  789. NWSipxCloseConnectionEndpoint
  790. (
  791.     SIPXCONN_HANDLE    hConnHandle
  792. );
  793.  
  794.  
  795. N_EXTERN_LIBRARY(nuint32)
  796. NWSipxCloseSocket
  797. (
  798.     SIPXSOCK_HANDLE    hSockHandle
  799. );
  800.  
  801.  
  802. N_EXTERN_LIBRARY(nuint32)
  803. NWSipxEstablishConnection
  804. (
  805.     PNWTCB                pNwtcb
  806. );
  807.  
  808.  
  809. N_EXTERN_LIBRARY(nuint32)
  810. NWSipxFreeControlBlock
  811. (
  812.     PNWTCB                pNwtcb
  813. );
  814.  
  815.  
  816. N_EXTERN_LIBRARY(nuint32)
  817. NWSipxFreeInformation
  818. (
  819.     nptr                    pInfoStruct
  820. );
  821.  
  822.  
  823. N_EXTERN_LIBRARY(nuint32)
  824. NWSipxGetInformation
  825. (
  826.     nuint32                infoType,
  827.     nptr                    hHandle,
  828.     pnptr                    ppInfoStruct,
  829.     pnuint32                pInfoStructLen
  830. );
  831.  
  832.  
  833. N_EXTERN_LIBRARY(nuint32)
  834. NWSipxGetInternetAddress
  835. (
  836.     SIPXSOCK_HANDLE    hSockHandle,
  837.     PNETADDR                pNetAddress
  838. );
  839.  
  840.  
  841. N_EXTERN_LIBRARY(nuint32)
  842. NWSipxGetMaxNsduSize
  843. (
  844.     SIPXSOCK_HANDLE    hSockHandle
  845. );
  846.  
  847.  
  848. N_EXTERN_LIBRARY(nuint32)
  849. NWSipxGetMaxTsduSize
  850. (
  851.     SIPXCONN_HANDLE    hConnHandle
  852. );
  853.  
  854.  
  855. N_EXTERN_LIBRARY(nuint32)
  856. NWSipxListenForConnection
  857. (
  858.     PNWTCB                pNwtcb
  859. );
  860.  
  861.  
  862. N_EXTERN_LIBRARY(nuint32)
  863. NWSipxOpenConnectionEndpoint
  864. (
  865.     pnuint16                pSocket,
  866.     PSIPXCONN_HANDLE    pConnHandle
  867. );
  868.  
  869.  
  870. N_EXTERN_LIBRARY(nuint32)
  871. NWSipxOpenSocket
  872. (
  873.     pnuint16                pSocket,
  874.     PSIPXSOCK_HANDLE    pSockHandle
  875. );
  876.  
  877.  
  878. N_EXTERN_LIBRARY(nuint32)
  879. NWSipxQueryServices
  880. (
  881.     nuint16                queryType,
  882.     nuint16                serviceType,
  883.     PNWTCB                pNwtcb
  884. );
  885.  
  886.  
  887. N_EXTERN_LIBRARY(nuint32)
  888. NWSipxReceiveDatagram
  889. (
  890.     PNWTCB                pNwtcb
  891. );
  892.  
  893.  
  894. N_EXTERN_LIBRARY(nuint32)
  895. NWSipxReceiveMessage
  896. (
  897.     PNWTCB                pNwtcb
  898. );
  899.  
  900.  
  901. N_EXTERN_LIBRARY(nuint32)
  902. NWSipxRegisterForTransportEvent
  903. (
  904.     PNWTCB                 pNwtcb
  905. );
  906.  
  907.  
  908. N_EXTERN_LIBRARY(nuint32)
  909. NWSipxSendDatagram
  910. (
  911.     PNWTCB                pNwtcb
  912. );
  913.  
  914.  
  915. N_EXTERN_LIBRARY(nuint32)
  916. NWSipxSendMessage
  917. (
  918.     PNWTCB                pNwtcb
  919. );
  920.  
  921.  
  922. N_EXTERN_LIBRARY(nuint32)
  923. NWSipxSetInformation
  924. (
  925.     nuint32                infoType,
  926.     nptr                    hHandle,
  927.     nptr                    pInfoStruct
  928. );
  929.  
  930.  
  931. N_EXTERN_LIBRARY(nuint32)
  932. NWSipxTerminateConnection
  933. (
  934.     PNWTCB                pNwtcb
  935. );
  936.  
  937.  
  938. N_EXTERN_LIBRARY(nuint32)
  939. NWSipxWaitForSingleEvent
  940. (
  941.     PNWTCB                pNwtcb,
  942.     nuint32                timeOut
  943. );
  944.  
  945.  
  946. N_EXTERN_LIBRARY(nuint32)
  947. NWSipxWaitForMultipleEvents
  948. (
  949.     SIPXMUXGRP_HANDLE    muxGroupHandle,
  950.     nuint32                timeOut,
  951.     PPNWTCB                ppNwtcb
  952. );
  953.  
  954.  
  955. //===[ Global variables ]==================================================
  956.  
  957. #endif    // NWSIPX32_H
  958.  
  959. //=========================================================================
  960. //=========================================================================
  961.